//
//  String+.swift
//  FlashBack
//
//  Created by MAC on 2021/6/7.
//  Copyright © 2021 ven. All rights reserved.
//

import Foundation

public extension String {
    
    func appendLineToURL(fileURL: URL) throws {
        try (self + "\n").appendToURL(fileURL: fileURL)
    }
    
    func appendToURL(fileURL: URL) throws {
        let data = self.data(using: String.Encoding.utf8)!
        try data.append(fileURL: fileURL)
    }
}
